package _0_语法._4_循环._1_单循环;

import java.util.Scanner;

public class _1_依次输入10个数_输出最大值 {

    public static void main(String[] args) {

        Scanner scanner = new Scanner(System.in);
        int num;
        // 最大值变量，赋值最小值
        int max = Integer.MIN_VALUE;

        for (int i = 0; i < 10; i++){
            System.out.println("请输入第" + (i + 1) + "个值：");
            num = scanner.nextInt();
            if(num > max){
                max = num;
            }
        }
        System.out.println("最大值为：" + max);
    }
}
